I want metrics for how much writing and reading have been done to a folder.
vmstat -d
gives metrics at the whole disk level. iotop
will give per process rw stats.
But how can I find out how much writing has been done to a folder or file?
I want metrics for how much writing and reading have been done to a folder.
vmstat -d
gives metrics at the whole disk level. iotop
will give per process rw stats.
But how can I find out how much writing has been done to a folder or file?
Given the clarification in the comment - the need of knowing how much data is being sent to the underlying block device (e.g. for the purposes of logging activity on SSD) - you'd need to check this in the file system driver and below (which usually is part of the kernel). Note, that just writing to a file doesn't mean the data gets really sent or even written to the device - there usually is lots of caching between the write()
system call in user space and the actual bits making it into the wires connecting the hard drive to the controller.
du -sx
invocations? – Bratchley Dec 19 '14 at 23:41