* A stackable filesystem to trace low level filesystem operations
@ 2012-01-03 21:20 Sushil Mantri
2012-01-03 21:45 ` Greg Freemyer
2012-01-04 0:03 ` Dave Chinner
0 siblings, 2 replies; 6+ messages in thread
From: Sushil Mantri @ 2012-01-03 21:20 UTC (permalink / raw)
To: linux-ext4
Hi All,
Sorry but this isn't a ext4 specific question but a general filesystem question.
I am looking for a way to track filesystem level operation like
operation(read/write), filename, offset, size of read/write, pid of
the requesting process. The goal of my project is to collect such
traces and understand access usage of directories and more. I would
like to filter other operation like open,close, etc and requests to
procfs, etc. There was a stackable file system earlier called Tracefs.
It isn't supported anymore though. The original paper can be found
here: filesystems.org/docs/tracefs-fast04/tracefs.ps
Can you please suggest me what is the best option i have. I am
currently looking at SystemTap.
Thanks,
Sushil
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A stackable filesystem to trace low level filesystem operations
2012-01-03 21:20 A stackable filesystem to trace low level filesystem operations Sushil Mantri
@ 2012-01-03 21:45 ` Greg Freemyer
2012-01-03 21:50 ` Sushil Mantri
2012-01-04 0:03 ` Dave Chinner
1 sibling, 1 reply; 6+ messages in thread
From: Greg Freemyer @ 2012-01-03 21:45 UTC (permalink / raw)
To: Sushil Mantri; +Cc: linux-ext4
On Tue, Jan 3, 2012 at 4:20 PM, Sushil Mantri <sushilmantri@gmail.com> wrote:
> Hi All,
>
> Sorry but this isn't a ext4 specific question but a general filesystem question.
>
> I am looking for a way to track filesystem level operation like
> operation(read/write), filename, offset, size of read/write, pid of
> the requesting process. The goal of my project is to collect such
> traces and understand access usage of directories and more. I would
> like to filter other operation like open,close, etc and requests to
> procfs, etc. There was a stackable file system earlier called Tracefs.
> It isn't supported anymore though. The original paper can be found
> here: filesystems.org/docs/tracefs-fast04/tracefs.ps
>
> Can you please suggest me what is the best option i have. I am
> currently looking at SystemTap.
>
> Thanks,
> Sushil
I think you're looking for either inotify or fanotify.
You might have better luck asking in the vfs mailinglist.
(linux-fsdevel@vger.kernel.org)
Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A stackable filesystem to trace low level filesystem operations
2012-01-03 21:45 ` Greg Freemyer
@ 2012-01-03 21:50 ` Sushil Mantri
2012-01-03 22:53 ` Greg Freemyer
0 siblings, 1 reply; 6+ messages in thread
From: Sushil Mantri @ 2012-01-03 21:50 UTC (permalink / raw)
To: linux-ext4, linux-fsdevel
Please read the following:
On Tue, Jan 3, 2012 at 4:45 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> On Tue, Jan 3, 2012 at 4:20 PM, Sushil Mantri <sushilmantri@gmail.com> wrote:
>> Hi All,
>>
>> Sorry but this isn't a ext4 specific question but a general filesystem question.
>>
>> I am looking for a way to track filesystem level operation like
>> operation(read/write), filename, offset, size of read/write, pid of
>> the requesting process. The goal of my project is to collect such
>> traces and understand access usage of directories and more. I would
>> like to filter other operation like open,close, etc and requests to
>> procfs, etc. There was a stackable file system earlier called Tracefs.
>> It isn't supported anymore though. The original paper can be found
>> here: filesystems.org/docs/tracefs-fast04/tracefs.ps
>>
>> Can you please suggest me what is the best option i have. I am
>> currently looking at SystemTap.
>>
>> Thanks,
>> Sushil
>
> I think you're looking for either inotify or fanotify.
This will only notify me when an event occurs,but is doesn't provide
tracing information. Further i think it will be very slow if i have to
trace the whol filesystem
>
> You might have better luck asking in the vfs mailinglist.
>
> (linux-fsdevel@vger.kernel.org)
>
> Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A stackable filesystem to trace low level filesystem operations
2012-01-03 21:50 ` Sushil Mantri
@ 2012-01-03 22:53 ` Greg Freemyer
0 siblings, 0 replies; 6+ messages in thread
From: Greg Freemyer @ 2012-01-03 22:53 UTC (permalink / raw)
To: Sushil Mantri; +Cc: linux-ext4, linux-fsdevel
On Tue, Jan 3, 2012 at 4:50 PM, Sushil Mantri <sushilmantri@gmail.com> wrote:
> Please read the following:
>
> On Tue, Jan 3, 2012 at 4:45 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
>> On Tue, Jan 3, 2012 at 4:20 PM, Sushil Mantri <sushilmantri@gmail.com> wrote:
>>> Hi All,
>>>
>>> Sorry but this isn't a ext4 specific question but a general filesystem question.
>>>
>>> I am looking for a way to track filesystem level operation like
>>> operation(read/write), filename, offset, size of read/write, pid of
>>> the requesting process. The goal of my project is to collect such
>>> traces and understand access usage of directories and more. I would
>>> like to filter other operation like open,close, etc and requests to
>>> procfs, etc. There was a stackable file system earlier called Tracefs.
>>> It isn't supported anymore though. The original paper can be found
>>> here: filesystems.org/docs/tracefs-fast04/tracefs.ps
>>>
>>> Can you please suggest me what is the best option i have. I am
>>> currently looking at SystemTap.
>>>
>>> Thanks,
>>> Sushil
>>
>> I think you're looking for either inotify or fanotify.
> This will only notify me when an event occurs,but is doesn't provide
> tracing information. Further i think it will be very slow if i have to
> trace the whol filesystem
inotify and fanotify can both be set to work one file at a time I'm
pretty sure.
ie. You can register to be notified only for specific files and their actions.
There are kernel space hooks for them both I think that allow your
kernel code to be called upon an event. So if you want to create a
basic kernel log tracing package it should be easy enough. (It may be
you need to use the fsnotify API directly for that.)
I don't know if patches for that are floating around. Again, you
should ask on fs-devel, not here.
Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A stackable filesystem to trace low level filesystem operations
2012-01-03 21:20 A stackable filesystem to trace low level filesystem operations Sushil Mantri
2012-01-03 21:45 ` Greg Freemyer
@ 2012-01-04 0:03 ` Dave Chinner
2012-01-04 1:37 ` Theodore Tso
1 sibling, 1 reply; 6+ messages in thread
From: Dave Chinner @ 2012-01-04 0:03 UTC (permalink / raw)
To: Sushil Mantri; +Cc: linux-ext4
On Tue, Jan 03, 2012 at 04:20:21PM -0500, Sushil Mantri wrote:
> Hi All,
>
> Sorry but this isn't a ext4 specific question but a general filesystem question.
>
> I am looking for a way to track filesystem level operation like
> operation(read/write), filename, offset, size of read/write, pid of
> the requesting process. The goal of my project is to collect such
> traces and understand access usage of directories and more. I would
> like to filter other operation like open,close, etc and requests to
> procfs, etc. There was a stackable file system earlier called Tracefs.
> It isn't supported anymore though. The original paper can be found
> here: filesystems.org/docs/tracefs-fast04/tracefs.ps
Add your own trace points to the VFS and extract and filter them
with trace-cmd.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A stackable filesystem to trace low level filesystem operations
2012-01-04 0:03 ` Dave Chinner
@ 2012-01-04 1:37 ` Theodore Tso
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Tso @ 2012-01-04 1:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: Theodore Tso, Sushil Mantri, linux-ext4
On Jan 3, 2012, at 7:03 PM, Dave Chinner wrote:
>
> Add your own trace points to the VFS and extract and filter them
> with trace-cmd.
Tracepoints are definitely the way to go, and I'd suggest moving this discussion to the fsdevel@vger.kernel.org mailing list, and see if we can get a set of tracepoints that everyone would find useful and drop them into the VFS as standard tracepoints that people using SystemTap, or perf, or trace, other standardized tracing tools, can use.
Sushil, maybe you can learn about how tracepoints work and drive this effort?
Regards,
-- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-04 1:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 21:20 A stackable filesystem to trace low level filesystem operations Sushil Mantri
2012-01-03 21:45 ` Greg Freemyer
2012-01-03 21:50 ` Sushil Mantri
2012-01-03 22:53 ` Greg Freemyer
2012-01-04 0:03 ` Dave Chinner
2012-01-04 1:37 ` Theodore Tso
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).