Is there any way to know which library files are being used by which process (or by how many number of process) in some amount of time.
Can V-Tune or perf or OProfile be used for this?
Is there any way to know which library files are being used by which process (or by how many number of process) in some amount of time.
Can V-Tune or perf or OProfile be used for this?
At any moment, one can list all shared-libraries within the process map of a particular process-pid
cat /proc/<pid>/maps | grep <name of library>
Also one can check the list of running processes that have opened a particular shared library
lsof <path-to-shared-library-file>
Is there any way to know which library files are being used by which process (or by how many number of process)
You can take a snapshot by cat /proc/*/maps > /tmp/snapshot
and then use grep
and wc
to answer your question.
If you want to monitor the system for some period of time, you could take the snapshot every second or so.
Can V-Tune or perf or OProfile be used for this?
You can do perf record -a
, then perf script -D
and look for PERF_RECORD_MMAP
events.