Tracking flash IO activity?

valent.turkovic at gmail.com valent.turkovic at gmail.com
Sat May 16 14:18:32 PDT 2015


On 16 May 2015 at 22:53, Brian Norris <computersforpeace at gmail.com> wrote:
> On Sat, May 16, 2015 at 10:41:53PM +0200, valent.turkovic at gmail.com wrote:
>> I have used iostat but it is not showing any changes on /dev/mtdblock5
>> which is mounted as /overlay jffs2 partition on this device I'm using.
>> I have also checked stats in /proc/diskstat, and they also only change
>> for /dev/mmcblk0p1 which is usb device, but not for any of
>> /dev/mtdblockX partitions.
>
> JFFS2 doesn't actually use mtdblock. At most, it uses it as a
> placeholder, which tells it to actually use the corresponding /dev/mtdX
> device:

Thanks Brian, I'll keep that in mind.

> http://www.linux-mtd.infradead.org/faq/jffs2.html#L_mtdblock
>
>> > through fio and iostats , just starts an io through dd gets status through
>> > iostats, i have not used but i know.
>
> Those are all for monitoring block devices. MTDs are not block devices:
>
> http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_what
>
> I don't know of any similar IO stats for MTDs, sorry.


I tried digging trough /sys and checked out few files from
/sys/devices/platform/ath79-spi/spi_master/spi0/spi0.0/mtd/ and
/sys/block/mtdblock5/ and most I found out that this is NOR type of
memory and that it has 65536 size of eraseblock.

I also found mtd-utils:
http://processors.wiki.ti.com/index.php/MTD_Utilities, but I don't see
any tool in mtd-utils that shows stats of how many eraseblocks were
written and read.

Could I access jffs2 stats somehow for /overlay partition?



More information about the linux-mtd mailing list