Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system...

2014-12-06 Thread Johannes Altmanninger
Hi,

meino.cra...@gmx.de writes:

 In the context of preserving the live of flash media by minimizing
 the count of unessary writes I want to know which
 application/daemon/etc is continous writing to that media and which
 entity (file/pipe/fifo...) is receiving those writes...

You could use this:

# echo 1  /proc/sys/vm/block_dump

then every read and write operation on block devices shows up in dmesg
with the PID, process name and the block id. (This can be a lot of
lines, so dmesg -c might be useful) I'm not exactly sure how to identify
which files belong to which block, though.

Regards
Johannes


signature.asc
Description: PGP signature


Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system...

2014-12-06 Thread Andrew Savchenko
On Sat, 06 Dec 2014 12:01:16 +0100 Johannes Altmanninger wrote:
 Hi,
 
 meino.cra...@gmx.de writes:
 
  In the context of preserving the live of flash media by minimizing
  the count of unessary writes I want to know which
  application/daemon/etc is continous writing to that media and which
  entity (file/pipe/fifo...) is receiving those writes...
 
 You could use this:
 
 # echo 1  /proc/sys/vm/block_dump
 
 then every read and write operation on block devices shows up in dmesg
 with the PID, process name and the block id. (This can be a lot of
 lines, so dmesg -c might be useful) I'm not exactly sure how to identify
 which files belong to which block, though.

This depends on filesystem being used. For ext* family debugfs may
be used:
# debugfs /dev/your_dev
ncheck inode1 inode2 ...

Best regards,
Andrew Savchenko


pgpTSVfkHacd7.pgp
Description: PGP signature


Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system...

2014-12-06 Thread lee
meino.cra...@gmx.de writes:

 Hi,

 on different systems I see the write stats (/proc/dikstats) to
 physical existing disks steadily increasing. 
 Looking at the output of lsof I cannot find any file suspicous
 for receiving those writes.

 In the context of preserving the live of flash media by minimizing
 the count of unessary writes I want to know which
 application/daemon/etc is continous writing to that media and which
 entity (file/pipe/fifo...) is receiving those writes...

 How can I find that information?

iotop might tell you.

Since you don't see anything in lsof, I'd assume that the file (if it's
a file) is opened and closed rather than being kept open.  Or could it
be a swap partition which is used?


-- 
Again we must be afraid of speaking of daemons for fear that daemons
might swallow us.  Finally, this fear has become reasonable.



Re: [gentoo-user] How to find out to what file(...) writes goes on a idle system...

2014-12-06 Thread Frank Steinmetzger
On Sat, Dec 06, 2014 at 12:27:06PM +0100, lee wrote:
 meino.cra...@gmx.de writes:
 
  Hi,
 
  on different systems I see the write stats (/proc/dikstats) to
  physical existing disks steadily increasing. 
  Looking at the output of lsof I cannot find any file suspicous
  for receiving those writes.
  […]
  How can I find that information?

 iotop might tell you.

I frequently use iotop -o. Another possibility might be ftop.
-- 
Gruß | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

“Your code is shit.. your argument is shit.” – Linus Torvalds, linux.kernel


signature.asc
Description: Digital signature