measuring the flash usage

Artem Bityutskiy dedekind1 at
Wed Sep 21 02:27:57 EDT 2011

On Tue, 2011-09-20 at 14:02 -0700, Brian Norris wrote:
> Hi,
> On Tue, Sep 20, 2011 at 4:22 AM, Folkert van Heusden
> <folkert.van.heusden at> wrote:
> > For an embedded system I'm working on I'd like to monitor the health
> > of the flash memory.
> > On regular Linux systems one can look at /proc/diskstats to see how
> > often the system writes to a disk. It seems though that (at least
> > kernel 2.6.19) for flash these counters are not updated.
> I don't have much experience with the /proc/diskstats but for me, it
> at least lists the mtdblockX devices I have on my system (which I
> don't use).

That will only account I/O via mtdblock, but not via mtd devices.

I think we do not have proper I/O accounting for MTD. In N900 we hacked
/proc/diskstats to also show MTD I/O, but for some reasons (do not
remember) we decided that would not be upstreamable. You can try that,
or introduce mtd-specific sysfs entries for accounting.

Best Regards,
Artem Bityutskiy

More information about the linux-mtd mailing list