Search code examples
linux-kernelshared-librariesperfintel-vtuneoprofile

system profiling - usage information of shared libraries


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?


Solution

  • 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.