Gentoo Archives: gentoo-user

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system...
Date: Sat, 06 Dec 2014 11:19:21
Message-Id: 20141206141908.b5550bb576d0936367d7765e@gentoo.org
In Reply to: Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system... by Johannes Altmanninger
1 On Sat, 06 Dec 2014 12:01:16 +0100 Johannes Altmanninger wrote:
2 > Hi,
3 >
4 > meino.cramer@×××.de writes:
5 >
6 > > In the context of preserving the live of flash media by minimizing
7 > > the count of unessary writes I want to know which
8 > > application/daemon/etc is continous writing to that media and which
9 > > """entity""" (file/pipe/fifo...) is receiving those writes...
10 >
11 > You could use this:
12 >
13 > # echo 1 > /proc/sys/vm/block_dump
14 >
15 > then every read and write operation on block devices shows up in dmesg
16 > with the PID, process name and the block id. (This can be a lot of
17 > lines, so dmesg -c might be useful) I'm not exactly sure how to identify
18 > which files belong to which block, though.
19
20 This depends on filesystem being used. For ext* family debugfs may
21 be used:
22 # debugfs /dev/<your_dev>
23 ncheck inode1 inode2 ...
24
25 Best regards,
26 Andrew Savchenko