iotop like tool for mtd devices

Richard Weinberger richard.weinberger at gmail.com
Thu Feb 8 01:30:05 PST 2018


Marc,

On Wed, Feb 7, 2018 at 8:31 PM, Marc Kleine-Budde <mkl at pengutronix.de> wrote:
> On 02/07/2018 07:21 PM, Marc Kleine-Budde wrote:
>> On 02/07/2018 02:40 PM, Marc Kleine-Budde wrote:
>>> as iotop doesn't work on (NAND) mtd devices, is there a tool, or an API
>>> to query the number of read or written bytes per mtd?
>>
>> For the record: switching on all the needed kernel config options as
>> stated in the iotop manpage helps a lot.
>
> Update:
>
> The kernel makes the information available at /proc/$$/io. However
> "read_bytes" and "write_bytes" seems not to be accurate for mtd devices.
>
> Poking around a bit in the kernel code makes me wonder if some
> task_io_account_read(), task_io_account_write() at the right places
> would make the accounting better?

I'd guess so.
One thing we need to consider are stacked MTDs, here the accounting
should not happen multiple times.



More information about the linux-mtd mailing list