How to trace per-file IO operations in Linux?

前端 未结 6 1311
不知归路
不知归路 2020-12-28 09:45

I need to track read system calls for specific files, and I\'m currently doing this by parsing the output of strace. Since read operat

6条回答
  •  -上瘾入骨i
    2020-12-28 09:58

    You could wait for the files to be opened so you can learn the fd and attach strace after the process launch like this:

    strace -p pid -e trace=file -e read=fd

提交回复
热议问题