Score:3

How compare several directories' data transfer (read/write) for defined periods?

ng flag

With interest for the amount of data transfered to or from several directories (including sub directories) it occured, that there is lack of tooling for this special task.

For low level integration, avoidance of resource intense demand and portability indexing (previously to monitoring) or database (tooling) installation shouldn't be necessary. What command line approach or script (or maybe widely unknown tools?) can monitor data io (e.g. MB/hour or up to seconds intervals) for several directories (capable for large tree depths and also big quantity of included files, for example /usr/share)?

Known similar utils for command line are iostat (only for block storage devices and partitions) or du -s (what is not capable for resolutions on a second(s) refresh period(s)).

(Searching within askubuntu.com knowledge base didn't show results, so far.)

cocomac avatar
cn flag
Does this answer your question? [How can I monitor disk I/O in a particular directory?](https://unix.stackexchange.com/q/9520/)
beyondtime avatar
ng flag
@cocomac: On systems with limited free storage or slower disk bandwidth (maybe older types of SD cards or slow HDDs) it would not be suitable (and mostly time intense) duplicating whole system directories (e.g. cp -r -p $SPECIALDIR2MONITOR /tmpcopy). Other suggestions are summarizing number of disk accesses (file or directory accesses), but no summary of transfered amount of data (e.g. kB, MB, GB or TB). Not really what would support on this system, sorry. Thanks for the useful addition.
beyondtime avatar
ng flag
depending on computing system performance capabilities parallelizing could help for faster command repeatings with `du` for huge directories (e.g. `parallel du -sm ::: *` ), https://stackoverflow.com/a/63481051/10873776 (maybe helpful for other researchers)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.