measuring the flash usage

Folkert van Heusden folkert.van.heusden at gmail.com
Wed Sep 21 02:47:41 EDT 2011


>> 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). If you use those (for instance, for JFFS2?), then I would
> imagine that Linux will track stats as with other block devices. Is
> this not your experience?

They're there, they just won't get updated.

> Generally, MTD is pretty good at printing important messages, which
> should get logged by your system. Also, bitflips/ECC errors can be
> tracked with ioctl(ECCGETSTATS). This info is retrieved, for example,
> by nanddump.

Are these values retained accross power off/reboots?
And will this work for NOR flash?


Thanks.

Folkert.



More information about the linux-mtd mailing list