On 06/20/2012 12:47 PM, John wrote:
> Hi,
> 
> I am trying to output to logcat when the kernel write blocks to any disk or 
> reads blocks from any disk  I think I found the file that would do this:
> 
> *external/e2fsprogs/lib/ext2fs/unix_io.c
> *

This is not the right file.  This is part of user-space
library for ext2 filesystem utilities (like fsck).

The kernel source code is not part of AOSP
(last time I checked).

Not to completely redirect you, but the kernel
code is already instrumented to provide block layer
statistics, and likely you can use ftrace if
you need to see individual read and writes.

None of this will be available via the Android logs, however
(unless you do something wonky like redirect the kernel logs
to the Android logs)

To see the kernel log, use dmesg on the target.
Or, if you're gathering data from the /proc or debug filesystems,
do the appropriate file operations on target:
e.g. cat /proc/diskstats

It sounds like the first thing you need to do is find
the source code for the kernel for your device.  Next, I think
it would be good for you to check out the blktrace manpage.
See http://linux.die.net/man/8/blktrace

 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================



-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to