Observar quais arquivos um processo abre ou quais processos abrem um arquivo parece um trabalho para sysdig
.
Basic opensnoop: snoop file opens as they occur
sysdig -p "%12user.name %6proc.pid %12proc.name %3fd.num %fd.typechar %fd.name" evt.type=open
Observe the I/O activity on all files named my.conf
sysdig -A -c echo_fds "fd.filename=my.conf"
Fom homem sysdig
NAME sysdig - the definitive system and process troubleshooting tool
SYNOPSIS sysdig [option]... [filter]
DESCRIPTION.
sysdig is a tool for system troubleshooting, analysis and explo‐ ration. It can be used to capture, filter and decode system calls and other OS events. sysdig can be both used to inspect live systems, or to generate trace files that can be analyzed at a later stage. sysdig includes a powerul filtering language, has customizable out‐ put, and can be extended through Lua scripts, called chisels.